package com.kyl.entity;

import com.kyl.base.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @author WanJl
 * @version 1.0
 * @title
 * @description
 * @create 2024/12/4
 */

@Data
@NoArgsConstructor
@ApiModel(value = "用户角色关联表实体类", description = "对应数据库中的用户角色关联表结构，该表为用户表和角色表的中间表")
public class UserRole extends BaseEntity {

    /**
     * 数据状态（0正常 1停用）
     */
    @ApiModelProperty(value = "数据状态（0正常 1停用）")
    private String dataState;

    /**
     * 角色ID
     */
    @ApiModelProperty(value = "角色ID")
    private Long roleId;

    /**
     * 用户ID
     */
    @ApiModelProperty(value = "用户ID")
    private Long userId;

    @Builder
    public UserRole(Long userId, Long roleId, String dataState) {
        this.userId = userId;
        this.roleId = roleId;
        this.dataState = dataState;
    }
}
